var app = getApp()

Page({

  data: {
    feedback: ''
  },

  submitFeedBack: function () {
    if (this.data.feedback === '') {
      return
    }
    var url = '/yuanmai_we/usercenter/feedback/add'
    var params = {
      FEEDBACK: this.data.feedback,
      __zaofans: true
    }
    app.request(url, params).then(res => {
      app.toast.success('反馈成功')
      setTimeout(() => {
        wx.navigateBack()
      }, 1000)
    })
  },
  contentInput: function (e) {
    this.setData({
      feedback: e.detail.value
    })
  }
})
